package com.practice.communication.block;

public class Bootstrap {
	
	public static void main(String[] args) throws InterruptedException {
		//启动服务端
		Thread server = new Thread(new Runnable() {
			
			@Override
			public void run() {
				Server.start();
			}
		});
		server.start();
		
		Thread.sleep(100);
		
		//发送消息
		new Thread(new Runnable() {
			
			@Override
			public void run() {
				Client.send();
			}
		}).start();
		
		Thread.sleep(100);
		
		
		//接收消息
		new Thread(new Runnable() {
			
			@Override
			public void run() {
				Client.receive();
			}
		}).start();
		
		new Thread(new Runnable() {
			
			@Override
			public void run() {
				Client.receive();
			}
		}).start();
	}

}
